package com.woniu.liuzhougov.itemAndTask.service;

import com.woniu.liuzhougov.itemAndTask.pojo.Department;

import java.util.List;

public interface DepartmentService {
    List<Department> listDepartments();

    /**
     * @param currentPage
     * @param pageSize
     * @return java.util.List<com.woniu.liuzhougov.itemAndTask.pojo.Department>
     * @author zhuxinpan
     * @date 2019/4/28 21:50
     * @description 列出部门(分页展示)
     */
    List<Department> listDepartments(Integer currentPage, Integer pageSize);

    /**
     * @param department
     * @return int
     * @author zhuxinpan
     * @date 2019/4/28 23:10
     * @description 添加部门
     */
    int insertDepartment(Department department);

    /**
     * @param department
     * @return int
     * @author zhuxinpan
     * @date 2019/4/28 23:14
     * @description 统计部门名称
     */
    int countByDepartmentName(Department department);

    /**
     * @param departmentId
     * @return com.woniu.liuzhougov.itemAndTask.pojo.Department
     * @author zhuxinpan
     * @date 2019/4/28 23:55
     * @description 通过主键获得部门详情
     */
    Department getDepartmentByDepartmentId(Integer departmentId);

    /**
     * @param department
     * @return int
     * @author zhuxinpan
     * @date 2019/4/28 23:56
     * @description 更新部门
     */
    int updateDepartment(Department department);

    /**
     * @param department
     * @return int
     * @author zhuxinpan
     * @date 2019/4/29 0:33
     * @description 更新部门领导
     */
    int updateLeaderId(Department department);

    /**
     * @param departmentId
     * @return int
     * @author zhuxinpan
     * @date 2019/4/29 0:56
     * @description 删除部门
     */
    int deleteDepartmentByDepartmentId(Integer departmentId);
}
